package com.ziyueyuwen.xiniao.dao;

import com.ziyueyuwen.xiniao.bean.ZyClassLessonUser;
import com.ziyueyuwen.xiniao.bean.vo.ZyClassLessonUserVO;
import com.ziyueyuwen.xiniao.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import static com.ziyueyuwen.xiniao.util.ConstUtil.KEY_CLASS_ID;
import static com.ziyueyuwen.xiniao.util.ConstUtil.KEY_USER_ACCOUNT;
/**
 * @author wancheng
 */
public interface ZyClassLessonUserMapper extends BaseMapper<ZyClassLessonUser>{
    /**
     * 获取插班生
     * @param lessonId
     * @return
     */
    List<ZyClassLessonUserVO> getTransferStudents(Integer lessonId);

    /**
     * 获取老师
     * @param lessonId
     * @return
     */
    ZyClassLessonUserVO getTeacher(Integer lessonId);

    /**
     * 某个班级下未上的课节, 统一修改任课老师
     *
     * @param classId Integer
     * @param userAccount String
     * @return Boolean
     */
    Boolean updateTeacherWhileLessonNotStart(@Param(KEY_CLASS_ID) Integer classId,
                                             @Param(KEY_USER_ACCOUNT) String userAccount);

    /**
     * 获取课节下的所有学生,包括插班生
     * @param lessonId
     * @return
     */
    List<ZyClassLessonUserVO> getStudent(Integer lessonId);
}